package com.lm.paymentadmin.common.config;


import org.springframework.context.annotation.Condition;
import org.springframework.context.annotation.ConditionContext;
import org.springframework.core.type.AnnotatedTypeMetadata;


/**
 * @author liuming
 * 配置swagger2正式环境不启用（现在为true）
 */
public class SwaggerEnableCondition implements Condition {

    @Override
    public boolean matches(ConditionContext context, AnnotatedTypeMetadata metadata) {
        String active = context.getEnvironment().getProperty("spring.profiles.active");
        return true;
    }

}
